<%@ Page PathInChannel="index{Ext}" %>
<!doctype html>
<html lang="<%=PageLang%>"<%If PageLang == "UYG"%> class="rtl"<%EndIf%>>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<title><%=Site[Name]%></title>
<link rel="stylesheet" href="<%=CommonPath%>aliui/skin/default/ali.mobile.css">
<link rel="stylesheet" href="<%=CommonSkinPath%>css/common.css">
<link rel="stylesheet" href="<%=SkinPath%>css/common.css">
</head>  
<body>
<div class="page tab1" id="index" data-logo="<%=Site[Logo]%>" data-get-recommended-category="<%=BuildUrl("ajax_index_get_recommended_category")%>" data-get-new-list="<%=BuildUrl("ajax_index_get_new_list")%>" data-save-image="长按上图保存图片！" data-subscribe-wxpp-from-qrcode="长按上图关注公众号！" data-loading="加载中..." data-has-read-all="已全部显示">
	<div class="tab1-content">
		<!-- start="标题栏" -->
		<div class="titlebar"><h1><%=Site[Name]%></h1></div>
		<!-- end="标题栏" -->
		
		<!-- start="内容" -->
		<div class="tab1-body">
			<!-- start="轮换广告" isAd="true" -->
			<ali:List Mark="Ad" Object="Ad" Condition="PositionID={61ad5257-60eb-4983-80b5-8d257812a6a5}">
				<div class="touchslider">
					<div class="touchslider-viewport">
						<ali:Record>
							<%If String.IsNullOrEmpty(Convert.ToString(URL))%>
								<div class="touchslider-item"><img src="<%=Image%>"></div>
							<%Else%>
								<div class="touchslider-item"><a href="<%=URL%>"><img src="<%=Image%>"></a></div>
							<%EndIf%>
						</ali:Record>
					</div>
					<div class="touchslider-navtag"></div>
				</div>
			</ali:List>
			<!-- end="轮换广告" -->
			
			<!-- start="主菜单" -->
			<ali:Menu Condition="IsDisplay=true and CategoryID IS NULL and ParentID IS NULL">
				<ul class="list1">
					<ali:Record>
						<li><a href="<%=URL%>"><img src="<%=CommonSkinPath%>image/default.png" data-src="<%=Thumbnail%>"><h1><%=Name%></h1></a></li>
					</ali:Record>
				</ul>
			</ali:Menu>
			<!-- end="主菜单" -->
			
			<!-- start="促销课程" -->
			<ali:List Object="Promotion" Condition="IsDeleted=false and EndTime>DateTime.Now" Sort="StartTime ASC,InnerID DESC">
				<div class="list2 margin1">
					<h1><label>促销课程</label></h1>
					<ul>
						<ali:Record>
							<li data-start="<%=StartTime%>" data-end="<%=EndTime%>">
								<a href="<%=BuildUrl(null, "course/view", "ID=" + CourseID)%>">
									<img src="<%=CommonSkinPath%>image/default.png" data-src="<%=CourseThumbnail%>">
									<h2><%=CourseName%></h2>
									<h4><label>促销价格：</label><em><%=Price%></em></h4>
									<h3><label><%=Name%></label><p><strong><%If Convert.ToDateTime(StartTime) > DateTime.Now%>距促销开始时间<%Else%>离促销结束时间<%EndIf%></strong><span><b>00</b>:<b>00</b>:<b>00</b>:<b>00</b></span></p></h3>
								</a>
							</li>
						</ali:Record>
					</ul>
				</div>
			</ali:List>
			<!-- end="促销课程" -->
			
			<!-- start="推荐课程" -->
			<ali:List Object="Course" Page="1" PageSize="5" Condition="IsDeleted=false and IsReleased=true and IsRecommended=true" Sort="Recommend DESC">
				<div class="list3 margin1">
					<h1>推荐课程</h1>
					<ali:Record>
						<%If Index == 0%>
							<ul>
						<%EndIf%>
						<%If Index ==0 || Index == 1%>
							<li>
								<a href="<%=BuildUrl(null, "course/view", "ID=" + InnerID)%>">
									<img src="<%=CommonSkinPath%>image/default.png" data-src="<%=Thumbnail%>">
									<h2><%=Name%></h2>
									<h3><label>价格：</label><%If Convert.ToDecimal(Price) == 0%><b>免费</b><%Else%><em><%=Convert.ToDecimal(Price).ToString("0.00")%></em><%EndIf%></h3>
									<i><%=Index + 1%></i>
								</a>
							</li>
						<%EndIf%>
						<%If Index >= 2 || Index == Count - 1%>
							</ul>
						<%EndIf%>
						<%If Index == 2%>
							<ol>
						<%EndIf%>
						<%If Index >= 2%>
							<li>
								<span><%=Index + 1%></span>
								<a href="<%=BuildUrl(null, "course/view", "ID=" + InnerID)%>"><%=Name%></a>
								<%If Convert.ToDecimal(Price) == 0%><b>免费</b><%Else%><em><%=Convert.ToDecimal(Price).ToString("0.00")%></em><%EndIf%>
							</li>
						<%EndIf%>
						<%If Index == Count - 1%>
							</ol>
						<%EndIf%>
					</ali:Record>
				</div>
			</ali:List>
			<!-- end="推荐课程" -->
			
			<!-- start="推荐教师" -->
			<ali:List Object="Teacher" Condition="IsDeleted=false and Recommend>0" Sort="Recommend DESC">
				<div class="list9 margin1">
					<h1><label>推荐教师</label><a href="<%=BuildUrl("teacher/list")%>">更多</a></h1>
					<ul>
						<ali:Record>
							<li>
								<a href="<%=BuildUrl(null, "teacher/view", "ID=" + InnerID)%>">
									<img src="<%=CommonSkinPath%>image/default.png" data-src="<%=Thumbnail%>">
									<h2><%=Name%></h2>
								</a>
							</li>
						</ali:Record>
					</ul>
				</div>
			</ali:List>
			<!-- end="推荐教师" -->
			
			<!-- start="最新课程" -->
			<div class="list4 margin1">
				<h1>最新课程</h1>
				<ul>
					<li class="more"></li>
				</ul>
			</div>
			<!-- end="最新课程" -->
		</div>
		<!-- end="内容" -->
	</div>	
	<ul class="tab1-bar">
		<li><a href="" class="tab1-home active">首页</a></li>
		<li><a href="<%=BuildUrl(null, "course/list", "CategoryID=&Type=&Order=&q=")%>" class="tab1-list">课程</a></li>
		<li><a href="<%=BuildUrl("user/index")%>" class="tab1-user">我的</a></li>
	</ul>
</div>
<script src="<%=CommonPath%>jquery/core3.js"></script>
<script src="<%=CommonPath%>jquery.touchslider.min.js"></script>
<script src="<%=CommonPath%>jquery.lazyloadxt.js"></script>
<script src="<%=CommonPath%>aliui/ali.mobile.min.js"></script>
<script src="<%=JsPath%>common.js"></script>
</body>
</html>
